package com.itheima.restkeeper.face;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.restkeeper.TableFace;
import com.itheima.restkeeper.req.TableVo;
import com.itheima.restkeeper.service.ITableService;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.config.annotation.Method;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Description 桌台dubbo接口实现
 */
@Slf4j
@DubboService(version = "${dubbo.application.version}",timeout = 5000,
    methods ={
        @Method(name = "findTableVoPage",retries = 2),
        @Method(name = "createTable",retries = 0),
        @Method(name = "updateTable",retries = 0),
        @Method(name = "deleteTable",retries = 0)
    })
public class TableFaceImpl implements TableFace {

    @Autowired
    ITableService tableService;
    
    @Override
    public Page<TableVo> findTableVoPage(TableVo tableVo, int pageNum, int pageSize) {
        //查询Page<Table>桌台分页对象
        //转换Page<Table>为Page<TableVo>
        //转换List<Table>为List<TableVo>
        //返回结果
        return null;
    }

    @Override
    public TableVo createTable(TableVo tableVo) {
        return null;
    }

    @Override
    @GlobalTransactional
    public Boolean updateTable(TableVo tableVo) {
        return null;
    }

    @Override
    public Boolean deleteTable(String[] checkedIds) {
        return null;
    }

    @Override
    public TableVo findTableByTableId(Long tableId) {
        return null;
    }

    @Override
    public List<TableVo> findTableVoList() {
        return null;
    }
}
